package com.chen.wow.day03.yunxingshiqiuzhi;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;


@Configuration
@PropertySource("classpath:/com/chen/wow/day03/yunxingshiqiuzhi/app.properties")
public class ExpressiveConfig {
	@Autowired
	Environment env;

	@Bean
	public Girl girl() {
		return new Girl(env.getProperty("girl.name"), env.getProperty("girl.age",Integer.class),
				env.getProperty("girl.mobile", "150"));
	}
	
}
